package com.hanter.demo.memoryleak;

import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.widget.Toast;

class MyHandler extends Handler {

    private Context mContext;

    public MyHandler(Context context) {
        mContext = context;
    }

    @Override
    public void handleMessage(Message msg) {
        super.handleMessage(msg);
        Toast.makeText(mContext, "task is complete", Toast.LENGTH_SHORT).show();
    }
}